Cementite Fe3C is studied with first-principles calculations. Two possible positions of carbon atoms in the iron sublattice are considered: with prismatic or octahedral environment. Mossbauer spectra (MS) with parameters calculated for both modifications are simulated above and below the Curie temperature. A possibility to detect the change in carbon position upon annealing from MS is discussed. It is shown that this is hardly possible using a standard approach to treatment of MS, but it can be seen in more subtle details of the MS below the Curie temperature, such as widths and positions of separate lines.